import request from '@/common/request.js';

/* 登录接口 */
const loginUrl = '/api/login';
/* 首页接口 */
const indexUrl = '/api/index';
/* 商品接口 */
const goodsUrl = '/api/goods';
/* 用户接口 */
const userUrl = '/api/user';
/* 公共接口 */
const commonUrl = '/api/common';
/* 公告接口 */
const articleUrl = '/api/Articles';
/* 短信接口 */
const smsUrl = '/api/Sms';
/* 新接口 */
const UserUrl = '/api/User';
const GoodsUrl = '/api/Goods';

/* sms接口 */

/* 短信验证码 */
export function sendSms(params) {
	return request({
		url: smsUrl + '/sendSms',
		method: 'POST',
		params
	})
};

/* --- login接口 --- */

/* 用户登录 */
export function login(params) {
	return request({
		url: loginUrl + '/login',
		method: 'POST',
		params
	})
};

/* 用户注册 */
export function register(params) {
	return request({
		url: loginUrl + '/register',
		method: 'POST',
		params
	})
};

/* 退出登录 */
export function loginOut() {
	return request({
		url: loginUrl + '/loginOut',
		method: 'POST'
	})
};

/* --- index接口 --- */

/* 首页轮播图 */
export function banner() {
	return request({
		url: indexUrl + '/banner',
		method: 'POST'
	})
};

/* --- goods接口 --- */

/* 首页活动列表 */
export function goodsCatList() {
	return request({
		url: goodsUrl + '/goodsCatList',
		method: 'POST'
	})
};

/* 首页活动列表 - 新 */
export function new_goodsCatList() {
	return request({
		url: goodsUrl + '/new_goodsCatList',
		method: 'POST'
	})
};

/* 商品列表 */
export function goodsList(params) {
	return request({
		url: goodsUrl + '/goodsList',
		method: 'POST',
		params
	})
};

/* 广告分商品列表 */
export function goodsSpecial(params) {
	return request({
		url: goodsUrl + '/goodsSpecial',
		method: 'POST',
		params
	})
};

/* 商品详情 */
export function goodsDetail(params) {
	return request({
		url: goodsUrl + '/goodsDetail',
		method: 'POST',
		params
	})
};

/* 商品详情 */
export function agent_goodsList() {
	return request({
		url: goodsUrl + '/agent_goodsList',
		method: 'POST',
	})
};

/* --- user接口 --- */

/* 忘记密码  提交 */
export function ForgetPassword(params) {
	return request({
		url: userUrl + '/ForgetPassword',
		method: 'POST',
		params
	})
};

/* 修改密码 */
export function modify_password(params) {
	return request({
		url: userUrl + '/modify_password',
		method: 'POST',
		params
	})
};

/* 获取用户信息 */
export function GETuserinfo(params) {
	return request({
		url: userUrl + '/GETuserinfo',
		method: 'POST',
		params
	})
};

/* 获取用户信息 */
export function getUserName(params) {
	return request({
		url: userUrl + '/getUserName',
		method: 'POST',
		params
	})
};

/* 获取用户信息 */
export function GETteam(params) {
	return request({
		url: userUrl + '/GETteam',
		method: 'POST',
		params
	})
};

/* 分享奖励数据 */
export function reward() {
	return request({
		url: userUrl + '/reward',
		method: 'POST'
	})
};

/* 买单列表 */
export function buyOrderList(params) {
	return request({
		url: userUrl + '/buyOrderList',
		method: 'POST',
		params
	})
};

/* 卖单列表 */
export function sellOrderList(params) {
	return request({
		url: userUrl + '/sellOrderList',
		method: 'POST',
		params
	})
};

/* 收货地址列表 */
export function addresslist() {
	return request({
		url: userUrl + '/addresslist',
		method: 'POST',
	})
};

/* 下单购买 */
export function createOrder(params) {
	return request({
		url: userUrl + '/createOrder',
		method: 'POST',
		params
	})
};

/* 取消订单 */
export function cancelOrder(params) {
	return request({
		url: userUrl + '/cancelOrder',
		method: 'POST',
		params
	})
};

/* 付款----订单详情----提交 */
export function payOrder(params) {
	return request({
		url: userUrl + '/payOrder',
		method: 'POST',
		params
	})
};

/* 付款----订单详情----获取商品 */
export function getOrder(params) {
	return request({
		url: userUrl + '/getOrder',
		method: 'POST',
		params
	})
};

/* 付款----订单详情----获取默认地址 */
export function getaddress() {
	return request({
		url: userUrl + '/getaddress',
		method: 'POST',
	})
};

/* 转售订单 */
export function resell(params) {
	return request({
		url: userUrl + '/resell',
		method: 'POST',
		params
	})
};

/* 订单发货 */
export function handlesend(params) {
	return request({
		url: userUrl + '/handlesend',
		method: 'POST',
		params
	})
};

/* 确认收款 */
export function completeOrder(params) {
	return request({
		url: userUrl + '/completeOrder',
		method: 'POST',
		params
	})
};

/* 获取用户收款信息 */
export function getpay() {
	return request({
		url: userUrl + '/getpay',
		method: 'POST',
	})
};

/* 保存收款信息 */
export function setPay(params) {
	return request({
		url: userUrl + '/setPay',
		method: 'POST',
		params
	})
};

/* 提现提交 */
export function draw(params) {
	return request({
		url: userUrl + '/draw',
		method: 'POST',
		params
	})
};

/* 抢购分明细 */
export function balance_log(params) {
	return request({
		url: userUrl + '/balance_log',
		method: 'POST',
		params
	})
};

/* 绿色积分明细 */
export function Reputation_log(params) {
	return request({
		url: userUrl + '/Reputation_log',
		method: 'POST',
		params
	})
};

/* 消费积分明细 */
export function xf_log(params) {
	return request({
		url: userUrl + '/xf_log',
		method: 'POST',
		params
	})
};

/* 资产明细 */
export function assets_log(params) {
	return request({
		url: userUrl + '/assets_log',
		method: 'POST',
		params
	})
};

/* 转赠广告分 */
export function currencyRotation(params) {
	return request({
		url: userUrl + '/currencyRotation',
		method: 'POST',
		params
	})
};

/* 转赠广告分 */
export function billLad_rotation(params) {
	return request({
		url: userUrl + '/billLad_rotation',
		method: 'POST',
		params
	})
};

/* 佣金明细 */
export function Return_commission(params) {
	return request({
		url: userUrl + '/Return_commission',
		method: 'POST',
		params
	})
};

/* 新增 收货地址 */
export function addaddress(params) {
	return request({
		url: userUrl + '/addaddress',
		method: 'POST',
		params
	})
};

/* 删除地址 */
export function deladdress(params) {
	return request({
		url: userUrl + '/deladdress',
		method: 'POST',
		params
	})
};

/* 编辑地址  提交 */
export function editaddress(params) {
	return request({
		url: userUrl + '/editaddress',
		method: 'POST',
		params
	})
};

/* 是否能进入活动场次 */
export function is_appointment(params) {
	return request({
		url: userUrl + '/is_appointment',
		method: 'POST',
		params
	})
};

/* 预约 */
export function appointmentTradFloor(params) {
	return request({
		url: userUrl + '/appointmentTradFloor',
		method: 'POST',
		params
	})
};

/* 自动预约列表 */
export function AutomaticSubscribeList(params) {
	return request({
		url: userUrl + '/AutomaticSubscribeList',
		method: 'POST',
		params
	})
};

/* 自动预约 */
export function submit_automaticYUYUE(params) {
	return request({
		url: userUrl + '/submit_automaticYUYUE',
		method: 'POST',
		params
	})
};

/* 获取省列表 */
export function GETprovince() {
	return request({
		url: userUrl + '/GETprovince',
		method: 'POST'
	})
};

/* 获取市列表 */
export function GETcity(params) {
	return request({
		url: userUrl + '/GETcity',
		method: 'POST',
		params
	})
};

/* 获取区列表 */
export function GETarea(params) {
	return request({
		url: userUrl + '/GETarea',
		method: 'POST',
		params
	})
};

/* 换购积分流水 */
export function integral_log(params) {
	return request({
		url: userUrl + '/integral_log',
		method: 'POST',
		params
	})
};

/* 换购积分流水 */
export function billLad_log(params) {
	return request({
		url: userUrl + '/billLad_log',
		method: 'POST',
		params
	})
};

/* 提现记录列表 */
export function Withdrawal_list(params) {
	return request({
		url: userUrl + '/Withdrawal_list',
		method: 'POST',
		params
	})
};

/* 转赠抢购分 */
export function BalanceTransfer(params) {
	return request({
		url: userUrl + '/BalanceTransfer',
		method: 'POST',
		params
	})
};

/* 购物卷转账 */
export function ShoppTransfer(params) {
	return request({
		url: userUrl + '/ShoppTransfer',
		method: 'POST',
		params
	})
};

/* 购物券流水 */
export function shopp_log(params) {
	return request({
		url: userUrl + '/shopp_log',
		method: 'POST',
		params
	})
};

/* 购物卷兑换提货卷 */
export function exchange_thj(params) {
	return request({
		url: userUrl + '/exchange_thj',
		method: 'POST',
		params
	})
};

/* 佣金积分流水 */
export function bonusPoints_log(params) {
	return request({
		url: userUrl + '/bonusPoints_log',
		method: 'POST',
		params
	})
};

/* 佣金积分兑换  抢购分 */
export function dh_balance(params) {
	return request({
		url: userUrl + '/dh_balance',
		method: 'POST',
		params
	})
};

/* 竞购商品  抢单 */
export function OrderGrabb(params) {
	return request({
		url: userUrl + '/OrderGrabb',
		method: 'POST',
		params
	})
};


/* 上传实名认证信息 */
export function RealName_Submit(params) {
	return request({
		url: userUrl + '/RealName_Submit',
		method: 'POST',
		params
	})
};

/* 实名认证信息 */
export function RealName_details(params) {
	return request({
		url: userUrl + '/RealName_details',
		method: 'POST',
		params
	})
};

/* --- article接口 --- */

/* 分类 */
export function ArticlesFENLEI() {
	return request({
		url: articleUrl + '/ArticlesFENLEI',
		method: 'POST'
	})
};

/* 文章列表 */
export function alist(params) {
	return request({
		url: articleUrl + '/alist',
		method: 'POST',
		params
	})
};

/* 文章详情 */
export function info(params) {
	return request({
		url: articleUrl + '/info',
		method: 'POST',
		params
	})
};

/* --- common接口 --- */

/* 获取用户收款码数据(付款时也请求这接口) */
export function getUserPay(params) {
	return request({
		url: commonUrl + '/getUserPay',
		method: 'POST',
		params
	})
};

/* 上传图片 */
export function uploadPic() {
	return request({
		url: commonUrl + '/uploadPic',
		method: 'POST'
	})
};


/* --- User接口 --- */

/* 充值接口 */
export function recharge(params) {
	return request({
		url: UserUrl + '/recharge',
		method: 'POST',
		params
	})
}

/* 充值明细 */
export function recharge_list(params) {
	return request({
		url: UserUrl + '/recharge_list',
		method: 'POST',
		params
	})
}

/* 预约套餐列表 */
export function SetMeal_list(params) {
	return request({
		url: UserUrl + '/SetMeal_list',
		method: 'POST',
		params
	})
}

/* 购买预约套餐 */
export function Buy_YySetMeal(params) {
	return request({
		url: UserUrl + '/Buy_YySetMeal',
		method: 'POST',
		params
	})
}

/* 佣金积分转赠 */
export function bonusPoints_Transfer(params) {
	return request({
		url: UserUrl + '/bonusPoints_Transfer',
		method: 'POST',
		params
	})
}

/* --- Goods接口 --- */

/* 获取活动场次 */
export function NewGetGoodsList(params) {
	return request({
		url: GoodsUrl + '/NewGetGoodsList',
		method: 'POST',
		params
	})
}

/* 获取赠送绿色积分商品 */
export function GiftBag_goodsList(/* params */) {
	return request({
		url: GoodsUrl + '/GiftBag_goodsList',
		method: 'POST',
		/* params */
	})
}